package org.txazo.music.web.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.txazo.music.web.action.base.BaseAction;

/**
 * LogoutAction
 * 
 * @author Tu XiaoZhou
 * @since 2013-04-12
 * 
 */
@Controller
@Scope("session")
public class LogoutAction extends BaseAction {

	private static final long serialVersionUID = 1L;

	@Action(value = "logout", results = { @Result(name = SUCCESS, location = "/login/login.jsp") })
	public String logout() {
		session.invalidate();

		return SUCCESS;
	}

}
